home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)TA
/
(A)TAU.ADF
/
fastfile
/
readme
< prev
next >
Wrap
Text File
|
1988-10-28
|
8KB
|
201 lines
(*======================================================================*)
(* AutoDiskChnage: A program to run FFS on floppies *)
(*======================================================================*)
(* Copyright ⌐ 1988 Martin Taillefer, All Rights Reserved *)
(* This is freely redistributable *)
(*======================================================================*)
(* Version: 1.00 Author : Martin Taillefer *)
(* Date : 12-Oct-88 Changes: Original *)
(*======================================================================*)
NOTE: This document will refer to "internal" and "first external" disk
drives. For A2000 users, the internal drive will be the disk drive on
the right side. The "first external" drive refers to the unit on the
left side on your Amiga.
FFS: The Fast File System
-------------------------
The Fast File System is an alternate file systen developed by Commodore to
replace the BCPL file system used up to this point. The initial release of
FFS (as shipped with the 1.3 enhancer kit) is geared towards non-removable
media such as hard disks, or RAD: (another 1.3 goodie). This means that FFS
doesn't directly support floopies.
The Problem: Swapping floppies
------------------------------
In all fairness, FFS does work on floppies. There is a problem though: it
doesn't notice when you swap floppies. This steems from the fact that FFS
currently expects to be run on non-removable media only. This means you can
easily corrupt floppies by writing data to a disk which was meant for
another disk since FFS doesn't know that you changed floppy and may have a
corrupt view of the floppy in the drive.
The First Solution: DISKCHANGE
------------------------------
The 1.2 release of AmigaDOS saw the apparition of the DISKCHANGE command.
This was mainly meant for 5'25 inch drive users. It turns out the command
can also be used to inform FFS whenever a disk is changed. This means that
every time you change a floppy, you have to send a DISKCHANGE command. This
is quite annoying, and risky. If you forget a DISKCHANGE only once you can
damage two floppies!
The Second Solution: AUTODISKCHANGE
-----------------------------------
AutoDiskChange is a small program that you run in the background. Every time
you change a floppy it will send the appropriate information to FFS to tell
it that a disk has changed. This puts FFS on the same level as the normal
file system.
The Third Solution: 1.4
-----------------------
Kickstart 1.4 will see FFS migrate into ROM. This will allow the system to
be completly running FFS (including floppies).
Why FFS on floppies?
--------------------
FFS will allow you to store 4.9% more data on the same floppy. It will also
do disk directories quite a bit faster. Disk reads and writes are speeded up
a little, but not that much. This is due to hardware limitations. One area
where a big difference can be perceived is when doing 2 or more disk
transactions simultaneously. If you're saving some data to floppy in DF0:
and reading stuff to the RAM disk from DF1:, there will be virtually no
slowdown of either the write or read operations. This is in contrast with
the old FS. Note that performing two disk operations on the same floopy still
results in HORRIBLE performance loss.
'How To' Guide
--------------
First, you need the file "FastFileSystem" in your system's L: directory.
Second, you will need the file "arp.library" in your system's LIBS:
directory.
Third, append the following MountList entries to your system's mountlist
(found in the DEVS: directory).
/* Entries to mount the normal DF0: and DF1: as FF0: and FF1:, those new
* handlers will use FFS.
*/
FF0: Device = trackdisk.device
FileSystem = l:FastFileSystem
GlobVec = -1
Mask = 0x7FFF
Unit = 0
Flags = 1
Surfaces = 2
Mount = 1
BlocksPerTrack = 11
Reserved = 2
PreAlloc = 11
Interleave = 0
LowCyl = 0 ; HighCyl = 79
Buffers = 5
BufMemType = 3
DosType = 0x444F5301
#
FF1: Device = trackdisk.device
FileSystem = l:FastFileSystem
GlobVec = -1
Mask = 0x7FFF
Unit = 1
Flags = 1
Surfaces = 2
Mount =1
BlocksPerTrack = 11
Reserved = 2
PreAlloc = 11
Interleave = 0
LowCyl = 0 ; HighCyl = 79
Buffers = 5
BufMemType = 3
DosType = 0x444F5301
#
Fourth, issue the following commands from a CLI:
MOUNT FF0:
MOUNT FF1:
At this point, you should run AutoDiskChange:
RUN >NIL: <NIL: AutoDiskChange FF0: FF1:
And voila! You now have two FFS drives on your system! Of course, you will
also need to format floppies in FFS mode. To do this, enter a blank disk in
your external drive and type:
SYS:SYSTEM/FORMAT DRIVE FF1: NAME "FFS Floppy!" NOICONS FFS
Once the format operation complete, you can now do a directory of your disk
and copy data onto it. You need to refer to the drive as FF1:, not DF1:. So
to copy something on an FFS floppy in your external drive, type:
COPY MyFile TO FF1:
You can still use your drives with old-style floppies. You just access them
as usual using DF0: and DF1:.
When an FFS floppy is in your external drive, the INFO command will report
that the disk in unit DF1: is "Not a DOS Disk", which is true, it's an FFS
disk. The entry for drive FF1: will correctly show the name of your floppy.
If you try to access an FFS floppy using DF1:, you'll get a "Not a DOS Disk"
requester. You can simply click cancel and try again with FF1:. The same
situation will occur if you try to access a non-FFS floppy as FFS.
The only way to get rid of FFS and of AutoDiskChange is to reboot the system.
Formal Instructions
-------------------
AutoDiskChange can accept up to four arguments. These arguments simply
describe the names of the FFS handlers for each of your drives. So as we did
above:
AutoDiskChange FF0: FF1:
tells the program that your internal floppy will be mounted as FF0: and your
first external floppy will be FF1:. You can specify up to four drives this
way. You must make sure your drives have been previously mounted as FFS
before using AutoDiskChange. You cannot mount your third external drive
without also mounting all drives before it. If you only intend on using FFS
on this drive it will not be a problem. Mounting FFS takes very little
memory, so you can mount on all your drive, but still use it on a single
drive.
How It All Works
----------------
AutoDiskChange hooks up in the trackdisk device disk change interrupt.
Whenever this interrupt occurs, the program then sends an ACTION_DISKCHANGE
packet to the related FFS handler.
Problems
--------
FFS will NOT warn you if you remove a floppy too quickly (when the drive
light is on). When writing, FFS also has a tendancy to turn off the drive
light for a few seconds, and then turns it back on for about a second. This
is because FFS caches information and if there is no activity for awhile,
flushes its buffers to disk.
FFS seems to return wierd status information to the INFO command. Simply
don't look at the status info! The problem was confirmed by Steve Beats of
Commodore and is due to the fact thet FFS doesn't know about removable
media.
I hope you benefit from this program, it was fun to write in any case.
Martin Taillefer
136 Des Frenes
Montreal, Quebec
CANADA H1B 1X8
TEL: 514/645-4083
BIX: vertex